package com.ygqh.baby.mapper;

import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.kids.entity.bo.KidsProductExt;
import com.ygqh.baby.model.AdminSkuSearchVo;
import com.ygqh.baby.po.AdminSku;
import com.ygqh.baby.po.AdminSkuExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface AdminSkuMapper {
	int countByExample(AdminSkuExample example);

	int deleteByExample(AdminSkuExample example);

	int deleteByPrimaryKey(Long id);

	int insert(AdminSku record);

	int insertSelective(AdminSku record);

	List<AdminSku> selectByExample(AdminSkuExample example);

	AdminSku selectByPrimaryKey(Long id);

	int updateByExampleSelective(@Param("record") AdminSku record, @Param("example") AdminSkuExample example);

	int updateByExample(@Param("record") AdminSku record, @Param("example") AdminSkuExample example);

	int updateByPrimaryKeySelective(AdminSku record);

	int updateByPrimaryKey(AdminSku record);

	void saveBatch(@Param("adminsku") List<AdminSku> adminsku);

	int countSuper(@Param("q") String q, @Param("groupId") Long groupId, @Param("productCode") String productCode);

	List<AdminSku> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param("q") String q, @Param("groupId") Long groupId,
			@Param("productCode") String productCode);

	long selectMaxProductCode(@Param("groupId") Long groupId);

	int updateStatusBySize(@Param("record") AdminSku record);

	void updateBatch(@Param("oldList") List<AdminSku> oldList);

	int updateByProductCode(@Param("productCode") String productCode, @Param("status") String status);

	int countSuperByProduct(@Param("productName") String productName, @Param("productCode") String productCode, @Param("skuCode") String skuCode,
			@Param("groupId") Long groupId);

	List<AdminSku> selectSuperByProduct(@Param("queryInfo") QueryInfo queryInfo, @Param("productName") String productName,
			@Param("productCode") String productCode, @Param("skuCode") String skuCode, @Param("groupId") Long groupId);

	List<AdminSku> selectSkuCodeByLists(@Param("list") List<String> list);

	AdminSku selectProductCodeByGroupAndColor(@Param("groupName") String groupName, @Param("color") String color);

	AdminSku selectSkuByName(@Param("groupName") String groupName, @Param("color") String color, @Param("productName") String productName,
			@Param("sizeName") String sizeName);

	List<AdminSku> selectByProductCode(@Param("productCode") String productCode);

	List<String> selectProductCodeByGroupId(@Param("groupId") Long groupId);

	Long selectMaxProductCodeByGroupId(@Param("groupId") Long groupId);

	List<AdminSku> selectListBySkuCode(@Param("skuCodeList") List<String> skuCodeList);

	int count(Map<String, Object> paramMap);

	List<AdminSkuSearchVo> selectList(Map<String,Object> paramMap);

	List<AdminSku> selectBaseInfoByProductCode(@Param("productCode") String productCode);

	int updatePushWdtByProductCode(@Param("productCode") String productCode, @Param("pushWdt") Boolean pushWdt);

	List<KidsProductExt> selectProductInfoForKids(@Param("productCodes") String[] productCodes);
}